package com.guiwu.gteway.industryapp.Device.module;

import com.google.gson.annotations.SerializedName;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by qiaoguan on 2018/3/10. 监控点组
 */

public class MonitorGroup {

    private String datapointGroupUid;
    private int datapointGroupId;
    private int upTime;
    private int upTimeState;
    private String groupName;

    @SerializedName("datapoints")
    private List<MonitorData> monitorData = new ArrayList<>();

    //监控点组
    public List<Monitor> monitors = new ArrayList<>();

    public MonitorGroup(String groupName){
        this.groupName = groupName;
    }

    public String getDatapointGroupUid() {
        return datapointGroupUid;
    }

    public void setDatapointGroupUid(String datapointGroupUid) {
        this.datapointGroupUid = datapointGroupUid;
    }

    public int getDatapointGroupId() {
        return datapointGroupId;
    }

    public void setDatapointGroupId(int datapointGroupId) {
        this.datapointGroupId = datapointGroupId;
    }

    public int getUpTime() {
        return upTime;
    }

    public void setUpTime(int upTime) {
        this.upTime = upTime;
    }

    public int getUpTimeState() {
        return upTimeState;
    }

    public void setUpTimeState(int upTimeState) {
        this.upTimeState = upTimeState;
    }

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public List<MonitorData> getMonitorData() {
        if (monitorData == null)
            return new ArrayList<>();
        else return monitorData;
    }

    public void setMonitorData(List<MonitorData> monitorData) {
        this.monitorData = monitorData;
    }

    public List<Monitor> getMonitors() {
        if (monitors == null)
            return new ArrayList<>();
        else
            return monitors;
    }

    public void setMonitors(List<Monitor> monitors) {
        this.monitors = monitors;
    }

    @Override
    public String toString() {
        return getGroupName() + "-----" + getMonitors();
    }
}
